#ifndef FACTORY_H
#define FACTORY_H

enum eFruitType{APPLE=1, PEAR, BANANA};

class CFruit
{
public:
	virtual void What() = 0;
};
class CBanana : public CFruit{
public:
	virtual void What();

};
class CPear : public CFruit{
public:
	virtual void What();
};
class CApple : public CFruit{
public:
	virtual void What();
};
class CFruitFactory{
public:
	CFruit *GetFruitInstance(eFruitType type);
};
#endif